import routes from "../../router/route"
let authList = []
let auth = sessionStorage.getItem('auth')
const getAuth = () => {
    routes.forEach(item => {
        if (item.children) {
            item.children.forEach(item2 => {
                if (item2.title) {
                    item2.use.forEach(item3 => {
                        if (item3 === auth) {
                            authList.push(item2)
                        }
                    })
                }
            })
        }
    })
    return authList
}

export default getAuth